<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-异常兑换监控管理">
</@frame.head>
<link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/multi-select.css">
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 后台管理中心 <span class="c-gray en">&gt;</span> 监控管理 <span class="c-gray en">&gt;</span> 异常兑换提醒 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
<form method="post" name="save_form"  id="save_form"  action="${contextPath}/monitor/monitor_warm_role_add"  >    
    <div class="text-c">
    <table class="table">
      <tr>
         <td>当出现兑换异常时，通知以下角色人员:</td>
      </tr>
      <tr>
      <td>
		<div class="row cl">
		<div class="formControls col-xs-6 col-sm-6">
      	<select id='pre-selected-options' multiple='multiple' name="roleIdList" id="roleIdList" >
	      <#list roles as list>  
	         <option value="${list.id?c}" <#if map['${list.id?c}']>selected="selected"</#if>>${list.name}</option>
	      </#list>
		</select>
		</div>
		</div>
      </td>
      </tr>
      <tr>
         <td>非授权角色&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         授权角色</td>  
      </tr>
      <tr>
       <td ><button type="button" class="btn btn-primary radius" onclick="sub_form();">提交</button></td>        
      </tr>
    </table>
    </div>
    
</form>
    
</div>
<@frame.end "default">
</@frame.end>
<script src="${contextPath}/resources/js/jquery.multi-select.js"></script>
<script type="text/javascript">
var path="${contextPath}";
$('#pre-selected-options').multiSelect();
function sub_form(){
	 layer.confirm("确定修改？",function(){
			layer.closeAll('dialog');
			var layer_load_window = layer.load(2);
			$("#save_form").ajaxSubmit({
				error : function() {
					layer.alert("操作失败！");
		       },
				success : function(data) {
				    if(data == "success"){
					    layer.msg('修改成功!',{icon:1,time:1000},function(){
					    	location.replace(location.href);
					    });
				   }else{
					layer.alert("操作失败！");
				   }
				},
				complete: function(XMLHttpRequest, textStatus) {
					layer.close(layer_load_window);
				}
			})
		 });
}
</script>